// 前端路由配置
// 作者: heruopu
// © 2025 Heruopu. All rights reserved.

import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ProjectManagement from '../views/ProjectManagement.vue'
import AIGeneration from '../views/AIGeneration.vue'
import CaseManagement from '../views/CaseManagement.vue'
import SystemSettings from '../views/SystemSettings.vue'
import UserManagement from '../views/UserManagement.vue'
import TemplateManagement from '../views/TemplateManagement.vue'
import ProductLineManagement from '../views/ProductLineManagement.vue'
import AIModelSettings from '../views/AIModelSettings.vue'
import MindmapDemo from '../views/MindmapDemo.vue'
import TestView from '../views/TestView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/project-management',
      name: 'projectManagement',
      component: ProjectManagement
    },
    {
      path: '/project',
      name: 'projectList',
      component: ProjectManagement
    },
    {
      path: '/project/create',
      name: 'createProject',
      component: ProjectManagement
    },
    {
      path: '/ai-generation',
      name: 'aiGeneration',
      component: AIGeneration
    },
    {
      path: '/ai',
      name: 'ai',
      component: AIGeneration
    },
    {
      path: '/case-management',
      name: 'caseManagement',
      component: CaseManagement
    },
    {
      path: '/case',
      name: 'caseList',
      component: CaseManagement
    },
    {
      path: '/case/create',
      name: 'createCase',
      component: CaseManagement
    },
    {
      path: '/system',
      name: 'systemSettings',
      component: SystemSettings
    },
    {
      path: '/system/user',
      name: 'userManagement',
      component: UserManagement
    },
    {
      path: '/system/template',
      name: 'templateManagement',
      component: TemplateManagement
    },
    {      
      path: '/system/product-line',
      name: 'productLineManagement',
      component: ProductLineManagement
    },
    {      
      path: '/product-line',
      name: 'productLineList',
      component: ProductLineManagement
    },
    {      
      path: '/system/ai-model',
      name: 'aiModelSettings',
      component: AIModelSettings
    },
    {      
      path: '/mindmap-demo',
      name: 'mindmapDemo',
      component: MindmapDemo
    },
    {
      path: '/test',
      name: 'test',
      component: TestView
    },
    {
      path: '/ai-generation-test',
      name: 'aiGenerationTest',
      component: () => import('../views/AIGenerationTest.vue')
    }
  ]
})

export default router